<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <style type="text/css">
        table {border-collapse: collapse; font-size: 14px; width: 80%; margin: auto;}
        table, th, td {border: 1px solid darkslategray;padding: 10px}
    </style>
</head>
<body>
<div style="text-align: center">
    <span style="color: darkslategray; font-size: 30px">欢迎使用导入系统！</span><br>
    <hr/>
    <table class="list">
        <tr>
            <td colspan="3">
                <form th:action="@{/student/importData}" method="post" enctype="multipart/form-data">
                    <input type="file" name="file">
                    <input type="submit" value="提交上传">
                </form>
            </td>
        </tr>
        <tr>
            <td>名字</td>
            <td>年龄</td>
            <td>性别</td>
        </tr>
        <tr th:each="stu: ${studentList}">
            <td th:text="${stu.name}"></td>
            <td th:text="${stu.age}"></td>
            <td th:text="${stu.sex}"></td>
        </tr>
    </table>
</div>
</body>
</html>